<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>

    #container {
      height: 800px;
      width: 900px;
      border: 1px red solid;
    }
    .box {
      height: 90%;
      width: 50%;
      border: 1px green solid;
      margin: 10px;

      display: flex;

      /* flex-direction: row; */

      flex-wrap: wrap;

      justify-content: space-around;

      align-items: center;

    }
    .flex {
       height: 200px;
       width: 150px;
       border: 1px pink solid;

       margin-top: 4px;
  
       
    }
  </style>
</head>

<body>
  <div id="container">
    <div class="box">
      <div class="flex"></div>
      <div class="flex"></div>
      <div class="flex"></div>
      <div class="flex"></div>
      <div class="flex"></div>
      <div class="flex"></div>
      <!-- <div class="flex"></div>
      <div class="flex"></div>
      <div class="flex"></div> -->
    </div>

  </div>

  <script>
    function test() {
      console.log("1.......");
      setTimeout(function(){

        test()
      }
      ,10*1000)
    }
    test()
  </script>
</body>
</html>